# common configuration parameters

CONFIG(debug, debug|release) {
    # debug configuration
    DESTDIR = ../bin/debug
    MOC_DIR = obj/debug/moc
    OBJECTS_DIR = obj/debug
    UI_DIR = obj/debug/ui
    DEFINES += _DEBUG \
            DEBUG
}
else {
    # release configuration
    DESTDIR = ../bin/release
    MOC_DIR = obj/release/moc
    OBJECTS_DIR = obj/release
    UI_DIR = obj/release/ui
    DEFINES += NDEBUG
}

# don't include core and gui libraries
QT -= core \
    gui


# customize warnings for g++
*-g++* {
    CONFIG -= warn_off
    CONFIG -= warn_on
    QMAKE_CFLAGS += -Wall \
        -W \
        -Wno-unused
    QMAKE_CXXFLAGS += -Wall \
        -W \
        -Wno-unused

    # don't use exceptions/rtti
    QMAKE_CXXFLAGS += -fno-rtti \
        -fno-exceptions
    QMAKE_LFLAGS += -fno-rtti \
        -fno-exceptions
}

# customize warnings for msvc (deprecated declarations, unused arguments)
win32-msvc* {
    CONFIG -= warn_off
    CONFIG -= warn_on
    QMAKE_CFLAGS += -W4 \
        -wd4996 \
        -wd4100
    QMAKE_CXXFLAGS += -W4 \
        -wd4996 \
        -wd4100
}
